package cate.game.play.skill.passive.exp;

import cate.game.play.buff.Buff;
import cate.game.play.buff.h.护盾BH;
import cate.game.play.config.PlayCfgArgs;
import cate.game.play.proce.action.ctx.ActionCtx;
import cate.game.play.skill.passive.PassiveHandler;

/**
 * 奇数回合护盾效果降低25%，
 */
public class 循环反复PH extends PassiveHandler {

	private double 血量调整;

	//血量调整=-2500
	@Override
	public void parse(String code) {
		PlayCfgArgs args = new PlayCfgArgs(code);
		血量调整 = args.getWDouble("血量调整", 0d);
	}

	@Override
	public void beforeOwnerBuffAdd(ActionCtx action, Buff otherBuff) {
		if (action.getRound().isOddRound()) {
			return;
		}
		if (otherBuff.handler instanceof 护盾BH) {
			((护盾BH) otherBuff.handler).add血量调整(血量调整);
		}
	}
}
